AC_INIT([42sh], [1.0], [], [boillo_u-42sh])
AC_CONFIG_AUX_DIR([build-aux])

AM_CFLAGS="-Wall -Wextra -Werror -std=c99 -pedantic -DNDEBUG -pipe"

AC_ARG_WITH([debug],
      [AS_HELP_STRING([--with-debug])],[
   AM_CFLAGS="-Wall -Wextra -Werror -std=c99 -pedantic -pipe -g -ggdb"
   CFLAGS=""
   AC_SUBST([CFLAGS])
   ])

AC_ARG_WITH([duma],
      [AS_HELP_STRING([--with-duma])],[
      AC_CHECK_LIB([efence], [malloc], [],
        [AC_MSG_ERROR([Cannot find efence library])])

   ])

AC_ARG_WITH([help],
      [AS_HELP_STRING([--help])],[])

AC_SUBST([AM_CFLAGS])

AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])

AC_PROG_CC

AC_CONFIG_FILES([Makefile
		src/Makefile
		doc/Makefile])
AC_OUTPUT
